<?php if(isset($lastworks)) { ?>
    <div id="lastwork">
        <div id="antraste2">
            <div class="antraste_pradzia"></div>
            <h2 class="antraste_content"><?php echo ucfirst(__('last works')); ?></h2>
            <div class="antraste_pabaiga"></div>
        </div>
        <?php foreach($lastworks as $key => $val): ?>
            <?php echo link_to(image_tag($val->getFirstImage()?'gallery/tiny/'.$val->getFirstImage()->getUname():'blank.gif'
                                        , array('title' => $val->getDescription()
                                                , 'alt' => $val->getDescription()
                                                , 'border' => 0))
                            , $val->getLinkTo()
                            , array('target' => '_blank'
                                , 'title' => $val->getDescription()))?>
        <?php endforeach; ?>
    </div>
<?php } ?>